package org.springblade.modules.repair.vo.statistics;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;

/**
 * @Description 作业汇总-领导
 * @Author ysq
 * @Date 2022/8/26
 **/
@Data
public class LeaderWorkSummaryVO {

	@ApiModelProperty(value = "作业人数")
	private Long workUserCount;

	@ApiModelProperty(value = "人均作业天数")
	private BigDecimal divUserWorkDay;

	@ApiModelProperty(value = "累计作业时长")
	private BigDecimal workTimeTotal;

	@ApiModelProperty(value = "人均日作业时长")
	private BigDecimal divUserDayWorkTime;

	public void setDivUserWorkDay(BigDecimal divUserWorkDay) {
		this.divUserWorkDay = divUserWorkDay.setScale(1, BigDecimal.ROUND_HALF_UP);
	}

	public void setWorkTimeTotal(Integer workTimeTotal) {
		this.workTimeTotal = new BigDecimal(workTimeTotal).divide(new BigDecimal("60"), 2, BigDecimal.ROUND_HALF_UP);
	}

	public void setDivUserDayWorkTime(Integer divUserDayWorkTime) {
		this.divUserDayWorkTime = new BigDecimal(divUserDayWorkTime).divide(new BigDecimal("60"), 2, BigDecimal.ROUND_HALF_UP);
	}

	public Long getWorkUserCount() {
		if (this.workUserCount == null) {
			this.workUserCount = 0L;
		}
		return workUserCount;
	}

	public BigDecimal getDivUserWorkDay() {
		if (this.divUserWorkDay == null) {
			this.divUserWorkDay = BigDecimal.ZERO;
		}
		return divUserWorkDay;
	}

	public BigDecimal getWorkTimeTotal() {
		if (this.workTimeTotal == null) {
			this.workTimeTotal = BigDecimal.ZERO.setScale(2);
		}
		return workTimeTotal;
	}

	public BigDecimal getDivUserDayWorkTime() {
		if (this.divUserDayWorkTime == null) {
			this.divUserDayWorkTime = BigDecimal.ZERO.setScale(2);
		}
		return divUserDayWorkTime;
	}
}
